package com.hww.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hww.dao.TableTypeMapper;
import com.hww.entity.Order;
import com.hww.entity.TableType;
import com.hww.service.TableTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class TableTypeImpl implements TableTypeService {
  @Autowired private TableTypeMapper tableTypeMapper;

  /**
   * 初始化页面
   *
   * @return
   */
  @Override
  public IPage<TableType> initializeData(Long pages) {
    QueryWrapper<TableType> entityWrapper = new QueryWrapper();

    Page<TableType> page = new Page<TableType>(pages, 10);

    IPage<TableType> selectPage = tableTypeMapper.selectPage(page, entityWrapper);
    return selectPage;
  }
}
